package com.livegoods.controller;

import com.livegoods.commons.pojo.LivegoodsResult;
import com.livegoods.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CommentController {


    @Autowired
    private CommentService commentService;

    @GetMapping("/comment")
    public LivegoodsResult comment(@RequestParam("id") String houseId,Integer page ,@RequestParam(defaultValue = "10") Integer size){
        return commentService.findByHouseId(houseId,page,size);
    }
}
